A leaderboard may be a list of ordered values and identifiers which may represent, for example, scores achieved by users of a game. For example, a leaderboard may display entries including the names or other identifiers of users, their scores, and the ranking of their scores among the scores achieved by other users. Entries on the leaderboard may be ordered based on the scores, for example, with the scores and users sorted from highest score to lowest score. If the leaderboard is public and displays scores for a large number of users, for example, the users of a game available on mobile devices, the number of entries on the leaderboard may grow very large, for example, into the millions.
The leaderboard, and its data including the user names and scores, may be stored at some central location where users can access it. When viewing a leaderboard, a user's device may not have enough memory to hold or screen space to display the entire leaderboard, and the bandwidth needed to transfer a leaderboard with millions of entries to a user may be excessive. The user may instead receive only the portion of the leaderboard they're interested in viewing. However, if the user wishes to view another portion of the leaderboard, for example, by scrolling down past the already displayed entries, the user's device may need to receive another portion of the leaderboard and hold that portion in memory along with the first, resulting in additional communication overhead and memory usage. The first portion of the leaderboard may also be discarded when new portion is received, but this may lead to a disjointed experience, as the entries displayed on the screen may change completely when a new portion is received, rather than changing one at a time as they would during normal scrolling.
As users scores are submitted to the leaderboard, the ordering of the entries and the ranking of the scores may need to be changed to reflect scores for new users and higher scores achieved by old users. Additionally, the leaderboard may need to be updated, or rebuilt, to reflect users who want to hide their score, have deleted their accounts, want to unhide their score, or need to have their score removed from the leaderboard for any other reason. This may be computationally expensive when the leaderboard has millions of entries, resulting in millions of scores that need sorting. The leaderboard may be updated, or rebuilt, at regular or irregular intervals to reduce computational demands, but any users who access the leaderboard in between rebuilds will be viewing an outdated version of the leaderboard.
To avoid the storage and computational costs of large leaderboards, some leaderboards may be limited in size, due to either not having a large number of scores submitted or being restricted to a specific locality or time period. Other leaderboards may order and rank only a small percentage of entries, so that only, for example, the top 100 scores are sorted and rank for display as leaderboard, or may only order users scores based on estimated percentiles, rather than actual sorting and ranking of the scores.